package com.jnu.erp.project.system.user.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Entity
@Table(name = "qf_user")
@Schema(name = "User", description = "用户")
public class User implements Serializable {

    @Id
    @Schema(description = "主键")
    private String id;

    @Schema(description = "手机")
    private String mobile;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "盐值")
    private String salt;

    @Column(name = "nick_name")
    @Schema(description = "昵称")
    private String nickname;

    @Schema(description = "性别")
    private String sex;

    @Schema(description = "生日")
    private LocalDate birthday;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "邮箱")
    private String email;

    @Column(name = "reg_date")
    @Schema(description = "注册日期")
    private LocalDateTime regDate;

    @Column(name = "update_date")
    @Schema(description = "修改日期")
    private LocalDateTime updateDate;

    @Column(name = "last_date")
    @Schema(description = "最后登录日期")
    private LocalDateTime lastDate;
}